<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>弹性盒布局</title>
</head>
<style>
    *{
        padding: 0;
        margin: 0;
    }
    .father{
        display: flex;
        /* flex-wrap: nowrap; */
        flex-direction: row;
        /* justify-content: space-between; */
        /* align-items: center; */
        justify-content: center;
    }
    .father .box{
        width: 200px;
        height: 200px;
        line-height: 200px;
        text-align: center;
        background-color: #666;
        border: 1px solid;
        order: -1;
        -webkit-order:-1;
    }
</style>
<body>
    <div class="father">
        <div class="box">box1</div>
        <div class="box">box2</div>
        <div class="box">box3</div>
        <div class="box">box4</div>
        <div class="box">box5</div>
        <div class="box">box6</div>
        <div class="box">box7</div>
        <div class="box">box8</div>
    </div>
</body>
</html>